package plugin;

public class ChangelogSingleUpdate {

	protected String[] fixed;
	protected String[] upgrades;
	protected String date;
	protected String version;
	protected String updatestring;

	public ChangelogSingleUpdate(String version, String date, String[] upgrades, String[] fixed) {
		this.version = version;
		this.date=date;
		this.upgrades=upgrades;
		this.fixed=fixed;
		makeText();
	}

	private void makeText() {
		String string = "";
		string+="Version "+version+" - "+date+""+"\r\n\r\n";
		string+="Fehler behoben:\r\n";
		for (String fix : fixed) {
			string+="- "+fix+"\r\n";			
		}
		string+="\r\nVerbesserungen:\r\n";
		for (String upgrade : upgrades) {
			string+="- "+upgrade+"\r\n";			
		}
		string+="\r\n"	+ "========================================================================"+ "\r\n\r\n";
		this.updatestring=string;
	}
	
	public String toString() {
		return this.updatestring;
	}

}
